<div class="box">
    <div class="box todos">
        <h2 class="box">最新问题列表</h2>
        <ul>
            <%
                var faq, status = null;
                for(var i = 0, len = faqs.length; i < len; i++) {
                    faq = faqs[i];
                    status = faq.status == 2 ? 'class="finished"' : '';
            %>
                <li <%= status %>>
                    <%= faq.content %> [<%= faq.post_date_disp %>] &nbsp;
                    <a href="/faq/<%= faq.qid %>/reply" >回复</a>
                    <a href="/faq/<%= faq.qid %>/edit">修改</a>
                    <% if (faq.status != 2) { %>
                        <a href="/faq/<%= faq.qid %>/finish?status=2">完成</a>
                    <% } else { %>
                        <a href="/faq/<%= faq.qid %>/finish?status=no">恢复</a>
                    <% } %>
                </li>
            <% } %>
        </ul>
    </div>
    <div class="box post">
        <h2>新增</h2>
        <form action="/faq/question/new" method="post" id="form">
            <p>
                <textarea rows="2" name="content" class="long_txt" ></textarea>
            </p>
            <p>
                <a href="javascript:void(0);" onclick="document.getElementById('form').submit();">添加</a>
            </p>
        </form>
    </div>
</div>

